<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<link rel="stylesheet" href="../css/common.css">
		<link rel="stylesheet" type="text/css" href="../css/shop.css" />
		<script src="../js/rem.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/jquery-3.3.1.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/layer/layer.js" type="text/javascript" charset="utf-8"></script>
		<title>商店</title>
		<script type="text/javascript">
			window.onload = function(){
				var self = this
				$.ajax({
					type:"post",
					url:"",
					data:{},
					success:function(res){
						self.list =res.list
					}
				});
			}
		</script>
	</head>
	<body>
		<div id="container">
			<div class="content" >
				<div class="buy" v-for="items in list" @click="giftDetails(items)">
					<div class="buy-left">
						<img :src="items.img" class="goods-img" alt="" />
					</div>
					<div class="buy-rigth">
						<p v-text="items.title" class="goods-title"></p>
						<p class="goods-price">￥{{items.price}}</p>
						<div class="goods">
							<span class="goods-discount">￥{{items.discount}}</span>
							<span class="goods-num">{{items.num}}人付款</span>
						</div>
						<div class="goods-buy-box">
							<input class="goods-buy" type="button" value="购买" @click="buy(items)" />
						</div>
						<span class="goods-show">购买成功赠送100票，可投给你喜欢的队伍</span>
					</div>
				</div>
				<div class="bottom"></div>
			</div>
		</div>
		
		<script type="text/javascript">
			new Vue({
				el: '#container',
				data: {
					list: [{
						id:'1',
						img: '../img/shanpin.png',
						title:'精品养生茶具精品养生茶具精品养生茶具精品养生餐具',
						price:'5.00',
						discount:'2.00',
						num:'1234',
					},{
						id:'2',
						img: '../img/shanpin.png',
						title:'精品养生茶具精品养生茶具精品养生茶具精品养生茶具',
						price:'5.00',
						discount:'2.00',
						num:'2234',
					},{
						id:'3',
						img: '../img/shanpin.png',
						title:'精品养生茶具精品养生茶具精品养生茶具精品养生茶具',
						price:'5.00',
						discount:'2.00',
						num:'3234',
					},{
						id:'4',
						img: '../img/shanpin.png',
						title:'精品养生茶具精品养生茶具精品养生茶具精品养生茶具',
						price:'5.00',
						discount:'2.00',
						num:'4234',
					}]
				},
				mounted() {},
				methods: {
					buy(items) {
						window.location.href = "order.html?goodsId="+items.id
					},
					giftDetails(items) {
					}
				}
			})
		</script>
	</body>
</html>
